package ru.uskov.trainer.model.impl;

import ru.uskov.trainer.model.IListboxItem;

public class ListboxItem implements IListboxItem{
	private final String id;
	private final String value;
	
	ListboxItem(String id, String value) {
		this.id = id;
		this.value = value;
	}
	
	@Override
	public int hashCode() {
		return id.hashCode();
	}
	
	@Override
	public String getId() {
		return id;
	}
	
	@Override
	public String getValue() {
		return value;
	}
	
	@Override
	public boolean equals(Object o) {
		if (o instanceof ListboxItem) {
			return ((ListboxItem)o).id.equals(id);
		}
		return false;
	}
}
